composability interactor (mesh), part 1#2303
Merged
andrei-marinica merged 55 commits intomasterfrom Mar 24, 2026
Merged
Conversation
|
Contract comparison - from 5197b19 to 142aca2
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new “mesh-node” composability test contract and a new “mesh-interactor” CLI tool for configuring/deploying/running composability call-tree scenarios, while also improving proxy generation/type handling and a few SDK ergonomics.
Changes:
- Add
mesh-nodesmart contract + wasm/meta artifacts; replace/remove older forwarder-queue + interact tooling. - Add
mesh-interactorCLI (layout generation, gas estimation, deploy, program calls/returns, bump, trace info) and a set of pre-generated layouts. - Improve proxy generation behavior around path-renames/type reporting, add convenience
From<[...; N]>conversions, and make transaction deserialization more tolerant viaserde(default).
Reviewed changes
Copilot reviewed 77 out of 82 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/http/src/gateway_http_proxy.rs | Adds a trailing-slash assert on proxy URI before formatting request URL. |
| sdk/dapp/src/gateway_dapp_proxy.rs | Adds a trailing-slash assert on proxy URL before formatting request URL. |
| sdk/core/src/test_wallets/s0phie.pem | Adds a new test wallet PEM file. |
| sdk/core/src/test_wallets/s1mon.pem | Adds a new test wallet PEM file. |
| sdk/core/src/test_wallets/s2onja.pem | Adds a new test wallet PEM file. |
| sdk/core/src/test_wallets.rs | Adds shard-targeted test wallets + for_shard() helper. |
| sdk/core/src/retrieve_tx_on_network.rs | Improves panic message on tx retrieval failure; adjusts log message; adds an import. |
| sdk/core/src/data/transaction.rs | Makes several tx-on-network fields defaultable during serde deserialization. |
| framework/meta-lib/src/contract/generate_proxy/proxy_process_type_name.rs | Documents + tests extract_struct_crate(). |
| framework/meta-lib/src/contract/generate_proxy/proxy_generator.rs | Adds proxy type summary printing; skips type generation when path-rename applies. |
| framework/base/src/types/managed/wrapped/managed_vec.rs | Adds From<[I; N]> for ManagedVec convenience conversion. |
| framework/base/src/types/managed/multi_value/multi_value_managed_vec.rs | Adds IgnoreValue support, as_vec(), and extra TypeAbiFrom impls. |
| framework/base/src/types/managed/basic/managed_buffer.rs | Adds From<[u8; N]> for ManagedBuffer convenience conversion. |
| contracts/feature-tests/composability/wasm/src/lib.rs | Updates generated wasm adapter endpoints block (now referencing mesh_node). |
| contracts/feature-tests/composability/wasm/Cargo.toml | Renames wasm package and changes dependency wiring. |
| contracts/feature-tests/composability/vault/sc-config.toml | Removes a proxy generation entry for the old interact tooling. |
| contracts/feature-tests/composability/tests/composability_scenario_rs_test.rs | Switches scenario registration to mesh-node; ignores one test as WIP. |
| contracts/feature-tests/composability/tests/composability_scenario_go_test.rs | Ignores one test as WIP. |
| contracts/feature-tests/composability/mesh-node/wasm/src/lib.rs | Adds generated wasm adapter for mesh-node. |
| contracts/feature-tests/composability/mesh-node/wasm/Cargo.toml | Renames wasm package and dependency to mesh-node. |
| contracts/feature-tests/composability/mesh-node/wasm/Cargo.lock | Updates lockfile entries from forwarder-queue to mesh-node. |
| contracts/feature-tests/composability/mesh-node/src/mesh_node_proxy.rs | Adds generated proxy for mesh-node contract calls. |
| contracts/feature-tests/composability/mesh-node/src/mesh_node.rs | Adds the new mesh-node contract implementation + types. |
| contracts/feature-tests/composability/mesh-node/sc-config.toml | Adds contract build/proxy config (including path-rename). |
| contracts/feature-tests/composability/mesh-node/multiversx.json | Adds multiversx contract metadata file. |
| contracts/feature-tests/composability/mesh-node/meta/src/main.rs | Adds meta crate entrypoint. |
| contracts/feature-tests/composability/mesh-node/meta/Cargo.toml | Renames meta package and dependency to mesh-node. |
| contracts/feature-tests/composability/mesh-node/Cargo.toml | Renames contract crate and lib path to mesh-node sources. |
| contracts/feature-tests/composability/mesh-interactor/src/mesh_interact_state.rs | Renames persisted address field to mesh_node_address. |
| contracts/feature-tests/composability/mesh-interactor/src/mesh_interact_main.rs | Adds new mesh-interactor CLI entrypoint and commands. |
| contracts/feature-tests/composability/mesh-interactor/src/mesh_interact_controller.rs | Adds controller init (gateway + wallets + code loading). |
| contracts/feature-tests/composability/mesh-interactor/src/mesh_interact_cli.rs | Adds clap CLI definitions for mesh-interactor. |
| contracts/feature-tests/composability/mesh-interactor/src/call_tree_info.rs | Adds trace querying/pretty-printing logic. |
| contracts/feature-tests/composability/mesh-interactor/src/call_tree_gas.rs | Adds recursive gas estimation and layout updating. |
| contracts/feature-tests/composability/mesh-interactor/src/call_tree_deploy.rs | Adds batched deploy logic and state persistence. |
| contracts/feature-tests/composability/mesh-interactor/src/call_tree_config_gen.rs | Adds layout generator producing multiple scenario permutations. |
| contracts/feature-tests/composability/mesh-interactor/src/call_tree_config.rs | Adds TOML schema + load/save helpers for layouts/state/config. |
| contracts/feature-tests/composability/mesh-interactor/src/call_tree_calling_functions.rs | Adds on-chain programming of calls/returns + bump execution. |
| contracts/feature-tests/composability/mesh-interactor/layouts/*.toml | Adds multiple generated scenario layouts. |
| contracts/feature-tests/composability/mesh-interactor/current.toml | Adds a generated “current state” file with concrete addresses/wallets. |
| contracts/feature-tests/composability/mesh-interactor/config.toml | Adds a default config pointing at a specific layout + gateway. |
| contracts/feature-tests/composability/mesh-interactor/all.sh | Adds a helper shell script to run a sequence of commands. |
| contracts/feature-tests/composability/mesh-interactor/Cargo.toml | Renames package/binary and wires in mesh-node dependency. |
| contracts/feature-tests/composability/mesh-interactor/.gitignore | Adjusts ignored artifacts for the new interactor layout. |
| contracts/feature-tests/composability/interact/src/vault_proxy.rs | Removes old generated vault proxy. |
| contracts/feature-tests/composability/interact/src/forwarder_queue_proxy.rs | Removes old generated forwarder-queue proxy. |
| contracts/feature-tests/composability/interact/src/comp_interact_main.rs | Removes old interactor entrypoint. |
| contracts/feature-tests/composability/interact/src/comp_interact_controller.rs | Removes old interactor controller. |
| contracts/feature-tests/composability/interact/src/comp_interact_config.rs | Removes old interactor config loader. |
| contracts/feature-tests/composability/interact/src/comp_interact_cli.rs | Removes old interactor CLI. |
| contracts/feature-tests/composability/interact/src/call_tree_deploy.rs | Removes old deploy helper. |
| contracts/feature-tests/composability/interact/src/call_tree_calling_functions.rs | Removes old call programming logic. |
| contracts/feature-tests/composability/interact/src/call_tree.rs | Removes old in-memory call tree model. |
| contracts/feature-tests/composability/interact/config.toml | Removes old interactor config file. |
| contracts/feature-tests/composability/forwarder-queue/wasm-forwarder-queue/src/lib.rs | Removes old forwarder-queue wasm adapter. |
| contracts/feature-tests/composability/forwarder-queue/wasm-forwarder-queue-promises/Cargo.lock | Removes old forwarder-queue-promises lockfile. |
| contracts/feature-tests/composability/forwarder-queue/src/forwarder_queue.rs | Removes old forwarder-queue contract implementation. |
| contracts/feature-tests/composability/forwarder-queue/sc-config.toml | Removes old forwarder-queue sc-config. |
| contracts/feature-tests/composability/forwarder-queue/meta/src/main.rs | Removes old forwarder-queue meta entrypoint. |
| contracts/feature-tests/composability/Cargo.toml | Swaps dev-dependency from forwarder-queue to mesh-node. |
| chain/core/src/types/shard_config.rs | Adds serde derives for ShardId behind feature flag. |
| chain/core/src/types/flags/code_metadata.rs | Adds documentation/comments clarifying CodeMetadata flags and helpers. |
| Cargo.toml | Replaces workspace members: remove old interact/forwarder-queue; add mesh-node + mesh-interactor. |
| Cargo.lock | Updates workspace lock entries to mesh-node + mesh-interactor; removes old interact/forwarder-queue. |
| CHANGELOG.md | Fixes callback attribute name in changelog snippet (promises_callback). |
| .gitignore | Adds .DS_Store. |
| .claude.md | Adds repository guidelines about not editing generated files. |
Comments suppressed due to low confidence (2)
contracts/feature-tests/composability/wasm/Cargo.toml:32
- This wasm crate depends on
composability-tests(a test harness) but the generated endpoints referencemesh_node. This will likely fail to compile/link because the contract module isn’t provided by that dependency. The dependency here should point to the actual contract crate being exported (e.g.mesh-node) and the package name should match what it builds.
contracts/feature-tests/composability/wasm/src/lib.rs:29 - The exported endpoints listed here (
queued_calls,set_queued_calls,callback_count, etc.) don’t match the endpoints defined in themesh-nodecontract (which usesprogrammed_calls,programmed_returns,trace,programCalls,programReturns, etc.). This mismatch is likely to cause build failures or runtime ABI inconsistencies; regenerate this wasm adapter from the correct contract crate / trait.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
contracts/feature-tests/composability/mesh-interactor/src/call_tree_calling_functions.rs
Show resolved
Hide resolved
contracts/feature-tests/composability/tests/composability_scenario_rs_test.rs
Outdated
Show resolved
Hide resolved
contracts/feature-tests/composability/mesh-interactor/current.toml
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Composability mesh interactor + SDK improvements
This branch builds out a comprehensive multi-shard composability interactor alongside foundational SDK and tooling improvements needed to drive it.
New
mesh-nodecontractThe old
forwarder-queuecontract has been replaced by a newmesh-nodecontract (contracts/feature-tests/composability/mesh-node). It serves as a configurable call-tree node capable of exercising every major cross-contract/cross-shard call pattern:transfer_executecallsThe contract name in traits and configs was also unified (renamed from
forwarder-queuetomesh-node).New
mesh-interactorThe old
interactdirectory has been replaced by themesh-interactorcrate (contracts/feature-tests/composability/mesh-interactor). This is a feature-complete interactor for running multi-contract, multi-shard call-tree scenarios on a live network:deploy,call,call-all,cleanupconfig.tomlseparate from layout filesSDK: per-shard test wallets
Three new named test wallets are added to
sdk/core, each guaranteed to reside in a specific shard on a 3-shard testnet:sophie()…0000simon()…0001szonja()…0002A convenience
for_shard(shard_id: u32)function dispatches to the appropriate wallet.SDK: gateway URL trailing-slash fix
GatewayHttpProxyandGatewayDappProxynow strip a trailing/from the URL supplied at construction time, preventing double-slash URLs likehttps://gateway.example.com//address/....SDK:
TransactionOnNetworkdeserialization robustnessSeveral fields that may be absent in certain network responses (
block_nonce,block_hash,miniblock_type,miniblock_hash,timestamp) are now annotated with#[serde(default)], preventing deserialization panics for pending or cross-shard transactions.Error messages in the transaction retrieval loop now include the transaction hash for easier debugging.
sc-meta proxy --verboseflagA new
--verboseflag is added tosc-meta all proxy(and the per-contractproxysub-command). When set, after generating the proxy it prints a categorised summary of all types encountered:[[proxy.path-rename]]rule covers their cratepath-rename)This is useful when authoring proxies that import types from sibling crates.
Proxy generator: path-rename type skipping
The proxy generator now respects
[[proxy.path-rename]]entries not only for renaming import paths in function signatures, but also to suppress type re-generation for types whose crate is covered by a rename rule. This avoids duplicate struct/enum definitions when the consumer already imports them from the original crate.Other / cleanup
forw_queue_async.scen.jsonscenario (replaced by the mesh-interactor approach)vault/sc-config.toml(no longer needed)CodeMetadatadoc improvementschain/coreshard config additions used by the mesh interactorManagedVec/MultiValueManagedVec/ManagedBufferminor additions required by the interactor